<?php

$name = $_GET["name"];
$callback = $_GET["callback"].'({"raw": "';
$callbackEnd = '"});';

$file_name = $name."_template.html";
$myfile = fopen($file_name, "r") or die("Unable to open file!");
$html =  fread($myfile,filesize($file_name));
fclose($myfile);

$html = str_replace(["\r", "\n"], '', $html);
$html = str_replace("\t", '', $html);
$html = str_replace("\"", '\"', $html);

echo $callback.$html.$callbackEnd;

?>
